API Documentation
IVector.h
1 // IVector.h
3 //
5 
6 namespace nkMaths
7 {
11  class DLL_GRAPHICS_EXPORT IVector : public ByteAlignedClass<16>
12  {
13  public :
14 
18  IVector () ;
25  IVector (int x, int y) ;
33  IVector (int x, int y, int z) ;
42  IVector (int x, int y, int z, int w) ;
48  IVector (const Vector& other) ;
54  IVector (const IVector& other) ;
60  IVector (const DirectX::XMVECTOR& value) ;
66  IVector (const DirectX::XMVECTORI32& value) ;
70  ~IVector () ;
71 
72  // Getters
76  int getX () const ;
80  int getY () const ;
84  int getZ () const ;
88  int getW () const ;
94  DirectX::XMVECTORI32 getValues () const ;
95 
96  // Setters
102  void setX (int value) ;
108  void setY (int value) ;
114  void setZ (int value) ;
120  void setW (int value) ;
121 
122  // Add
128  void addX (int value) ;
134  void addY (int value) ;
140  void addZ (int value) ;
146  void addW (int value) ;
152  void multX (int value) ;
158  void multY (int value) ;
164  void multZ (int value) ;
170  void multW (int value) ;
171 
172  // Distances
176  float getLength () const ;
180  int getLengthSquared () const ;
185  int getDistanceSquared (const IVector& other) const ;
190  float getDistance (const IVector& other) const ;
191 
192  // Practical
199  void fromString (const char* str) ;
200 
201  // Operators
208  IVector& operator= (const IVector& other) ;
215  IVector& operator= (const Vector& other) ;
222  IVector operator+ (const IVector& other) const ;
228  void operator+= (const IVector& other) ;
235  IVector operator- (const IVector& other) const ;
241  void operator-= (const IVector& other) ;
248  IVector operator* (const IVector& other) const ;
254  void operator*= (const IVector& other) ;
261  IVector operator* (int coeff) const ;
267  void operator*= (int coeff) ;
274  IVector operator/ (const IVector& other) const ;
280  void operator/= (const IVector& other) ;
287  IVector operator/ (int coeff) const ;
293  void operator/= (int coeff) ;
300  bool operator== (const IVector& other) const ;
307  bool operator< (const IVector& other) const ;
314  bool operator<= (const IVector& other) const ;
321  bool operator> (const IVector& other) const ;
328  bool operator>= (const IVector& other) const ;
329  } ;
330 }
nkMaths::IVector::addW
void addW(int value)
nkMaths::IVector::IVector
IVector(const IVector &other)
nkMaths::IVector::getDistance
float getDistance(const IVector &other) const
nkMaths::IVector::addX
void addX(int value)
nkMaths::IVector::getDistanceSquared
int getDistanceSquared(const IVector &other) const
nkMaths::IVector::~IVector
~IVector()
nkMaths::IVector::getW
int getW() const
nkMaths::IVector::IVector
IVector()
nkMaths::IVector::addY
void addY(int value)
nkMaths
Encompasses all API of component NilkinsMaths.
Definition: IVector.h:7
nkMaths::IVector::IVector
IVector(const DirectX::XMVECTORI32 &value)
nkMaths::IVector::setY
void setY(int value)
nkMaths::IVector::IVector
IVector(int x, int y, int z)
nkMaths::IVector::fromString
void fromString(const char *str)
nkMaths::IVector::IVector
IVector(int x, int y, int z, int w)
nkMaths::IVector::multW
void multW(int value)
nkMaths::IVector::IVector
IVector(const DirectX::XMVECTOR &value)
nkMaths::IVector::getLengthSquared
int getLengthSquared() const
nkMaths::IVector::setZ
void setZ(int value)
nkMaths::IVector::multX
void multX(int value)
nkMaths::IVector::multY
void multY(int value)
nkMaths::IVector::getZ
int getZ() const
nkMaths::IVector::setX
void setX(int value)
nkMaths::IVector::multZ
void multZ(int value)
nkMaths::IVector::getValues
DirectX::XMVECTORI32 getValues() const
nkMaths::IVector::addZ
void addZ(int value)
nkMaths::IVector::getX
int getX() const
nkMaths::IVector::IVector
IVector(const Vector &other)
nkMaths::IVector::getLength
float getLength() const
nkMaths::IVector
A 4-component vector class, with integers.
Definition: IVector.h:12
nkMaths::IVector::getY
int getY() const
nkMaths::IVector::setW
void setW(int value)
nkMaths::IVector::IVector
IVector(int x, int y)
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12